function couter(){
	var state=0;
	

	return function(){
		return state++;
	}
}

var c1=couter();
var c2=couter();
console.log(c1());
console.log(c1());
console.log(c2());